/*
   Chiroptera - A Java client for Bacula

   The main author of Chiroptera is Marcos Paulo Serafim.
   This program is Free Software; you can redistribute it and/or
   modify it under the terms of version two of the GNU General Public
   License as published by the Free Software Foundation and included
   in the file LICENSE.

   This program is distributed in the hope that it will be useful, but
   WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
   General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
   02110-1301, USA.
*/
package br.eti.mps.chiroptera.constants;

/**
 *
 * @author <a href="mailto:mpserafim[at]gmail[dot]com">Marcos Paulo Serafim</a>
 */
public interface Constants {

    public static String SPACE = " ";
    public static String LESS_THAN = "<";
    public static String GREATHER_THAN = ">";
    public static String DOT = ".";
    public static String AT = "@";
    public static String CR = "\n";
    public static String ZERO = "0";
    public static String EQUAL = "=";
    public static String YES = "yes";

    interface Chiroptera {

        public static String APP_NAME = "Chiroptera";
        public static String VERSION = "0.0.1";
        public static String AUTHOR = "Marcos Paulo Serafim";
        public static String EMAIL_AUTHOR = "mpserafim[at]gmail[dot]com";

        interface Errors {

            public static int IO = 1;
            public static int INVALID_DATA_SIZE = 2;
            public static int NOT_CONNECTED = 3;
            public static int HASH = 4;
            public static int NO_INT = 50;
            public static int AUTHENTICATION_FAILED = 51;
            public static int NOT_HANDLED = 52;
            public static int NOT_AUTHENTICATED = 53;
            public static int DATE_PARSE = 54;
        }

        interface ConfigurationKeys {

            public static String HOST_ADDRESS = "address";
            public static String HOST_PORT = "port";
            public static String PASSWORD = "password";
            public static String SERVER_COUNTRY = "server_country";
            public static String SERVER_LANGUAGE = "server_language";
        }
    }

    interface Bacula {

        public static int MAX_PACKET_SIZE = 1000000;
        public static String DATE_FORMAT = "dd-MMM-yy HH:mm";
    }

    interface Connection {

        interface Tokens {

            public static String AUTH = "auth";
            public static String CRAM_MD5 = "cram-md5";
            public static String SSL = "ssl";
            public static String SCHEDULED_JOBS = "Scheduled Jobs:";
            public static String NO_SCHEDULED_JOBS = "No Scheduled Jobs.";
            public static String END_JOBS = "====";
            public static String RUNNING_JOBS = "Running Jobs:";
            public static String NO_RUNNING_JOBS = "No Running Jobs.";
            public static String TERMINATED_JOBS = "Terminated Jobs:";
            public static String NO_TERMINATED_JOBS = "No Terminated Jobs.";
        }

        interface Messages {

            public static String OK = new StringBuffer("1000 OK: ").append(Constants.Chiroptera.APP_NAME).append(" Version: ").append(Constants.Chiroptera.VERSION).append("\n").toString();
            public static String HELLO = new StringBuffer("Hello *UserAgent* calling\n").toString();
            public static String AUTH_OK = "1000 OK auth\n";
            public static String YOU_HAVE_MESSAGES = "You have messages.";
        }

        interface DotCommands {

            public static String MESSAGES = ".messages\n";
            public static String CLIENTS = ".clients\n";
            public static String JOBS = ".jobs\n";
            public static String LEVELS = ".levels\n";
            public static String FILESETS = ".filesets\n";
            public static String POOLS = ".pools\n";
        }

        interface Commands {

            public static String STATUS_DIRECTOR = "status dir";
            public static String EXIT = "exit";
            public static String QUIT = "quit";
            public static String VERSION = "version";
            public static String HELP = "help";

        }

        interface Auth {

            public static String MD5 = "MD5";
            public static String HMACMD5 = "HmacMD5";
        }

        interface ReturnCodes {

            public static int SUCCESS = 1000;
        }
    }
}
